<%--
  Created by IntelliJ IDEA.
  User: camhoang
  Date: 7/22/11
  Time: 1:30 PM
  To change this template use File | Settings | File Templates.
--%>
<%@include file="include.jsp"%>
<%
   pageTitle = "System configuration";
   configurationTile = "Configure System";
%>
<%@include file="header.jsp"%>
      <form:form commandName="systemConfiguration">
         <table width="50%" cellpadding="3" cellspacing="0" border="0">
            <tr>
               <td colspan="2">
                  <h1>Web parser Configuration</h1>
               </td>
            </tr>
            <tr>
               <td width="150px">Word length maximum: </td>
               <td><form:input path="wordLengthMaximum"/></td>
            </tr>
            <tr>
               <td>Word length minimum: </td>
               <td><form:input path="wordLengthMinimum"/></td>
            </tr>
            <tr>
               <td colspan="2">
                  <h1>Rule Generation Configuration</h1>
               </td>
            </tr>
            <c:if test="${not empty initialRuleSetSize}">
               <tr>
                  <td colspan="2">
                     <span style="color:red">Estimated initial rule set size is ${initialRuleSetSize}</span>
                  </td>
               </tr>
            </c:if>
            <tr>
               <td>Word count minimum: </td>
               <td><form:input path="wordCountMinimum"/></td>
            </tr>
            <tr>
               <td>Rule length minimum: </td>
               <td><form:input path="ruleLengthMinimum"/></td>
            </tr>
            <tr>
               <td>Rule length maximum: </td>
               <td><form:input path="ruleLengthMaximum"/></td>
            </tr>
            <tr>
               <td>Flooring size: </td>
               <td><form:input path="flooringSize"/></td>
            </tr>
            <tr>
               <td>Classified rule set size: </td>
               <td><form:input path="classifiedRuleSetSize"/></td>
            </tr>
            <tr>
               <td>Fitness Argument 1: </td>
               <td><form:input path="fitnessArgument1"/></td>
            </tr>
            <tr>
               <td>Fitness Argument 2: </td>
               <td><form:input path="fitnessArgument2"/></td>
            </tr>
            <tr>
               <td>Maximum of GA generation: </td>
               <td><form:input path="generationMaximum"/></td>
            </tr>
            <tr>
               <td colspan="2">
                  <h1>Classified Classes</h1>
               </td>
            </tr>
            <tr>
               <td>Classified class count: </td>
               <td><form:input path="numberOfClasses"/></td>
            </tr>
            <c:forEach items="${systemConfiguration.classes.keySet()}" var="item">
               <tr>
                  <td>${item}</td>
                  <td><form:input path="classes['${item}']" /></td>
               </tr>
            </c:forEach>
            <tr>
               <td colspan="2">
                  <h1>Compatible Grade</h1>
               </td>
            </tr>
            <tr>
               <td>Left side adjustment: </td>
               <td><form:input path="triangleBottomLeft"/></td>
            </tr>
            <tr>
               <td>Right side adjustment: </td>
               <td><form:input path="triangleBottomRight"/></td>
            </tr>
            <tr>
               <td>Weight Minimum: </td>
               <td><form:input path="weightMinimum"/></td>
            </tr>
            <tr>
               <td colspan="2">
                  <h1>Proxy Configuration</h1>
               </td>
            </tr>
            <tr>
               <td>Proxy host: </td>
               <td><form:input path="proxyHost"/></td>
            </tr>
            <tr>
               <td>Proxy port: </td>
               <td><form:input path="proxyPort"/></td>
            </tr>
         </table>
         <input type="submit" value="Save"/>
      </form:form>

      <c:if test="${not empty status}">
         <span style="color:red"><b>${status}</b></span>
      </c:if>
   </body>
</html>